"""
从后台接口获取到验证码图片，并保存到code.png
http://mall.lemonban.com:8108/captcha.jpg?uuid=d3d2e0d6-5da3-43ec-85ed-06b
"""

import requests
import uuid

uuid = uuid.uuid4()

url = f"http://mall.lemonban.com:8108/captcha.jpg?uuid={str(uuid)}"

resp = requests.request("get", url)
# resp.text 文本 resp.content 二进制

with open("../code.png", "wb") as fs:
    fs.write(resp.content)
